Repository navigation
fix(storage): count stepSample + ppgHrSample in the decoded-rows footprint - #1398
Merged
Merged
Conversation
…f 14) `storageStats()` (Swift) and `storageRowCounts()` (Android) hand-listed a subset of the decoded raw stream tables, so the Test-Centre "decoded rows" footprint under-reported. Swift summed 8 of 14, Android 9 of 14; both omitted `ppgHrSample`, `sleepStateSample`, `ppgWaveformSample`, `rawImuSample`, `v18AuxSample` (Swift also `stepSample`) — and ppgHr/ppgWaveform/rawImu can each bank a lot of rows on a WHOOP 4.0. Count all 14 accumulating raw tables on both platforms, matching the canonical `TimestampHeal.rawTables` purge list (Swift now iterates that list rather than a fixed expression, so a future raw table can't silently drop out; comments on both sides point at the canonical list). Extended `ReadTests` to seed one row in every stream (incl. rawImu) and assert 18 decoded rows across all 14 tables. Diagnostic-only; no scoring/stored-data/BLE/UI-logic change.
ryanbr
force-pushed
the
fix/storagestats-missing-streams
branch
from
August 17, 2026 02:34
1f38afe to
c8733f5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Small correctness + parity nit noticed while reviewing DB storage.
The Test-Centre storage footprint under-reports decoded rows:
storageStats()summed only 8 of 10 decoded raw streams — omittingstepSampleandppgHrSample.storageRowCounts()hadstepsbut omittedppgHrSample.Both are real accumulating decoded streams (purged by
TimestampHeal/ device-forget alongside the others), andppgHrSample— the v26 PPG-derived per-second HR (#156) — can bank millions of rows on a WHOOP 4.0, so the omission materially under-counts the footprint that surface exists to report.Change: add
stepSample+ppgHrSampleto the Swift sum, addppgHrto the Android map — so both platforms count all 10 raw tables. Extended theReadTestsfootprint assertion 12 → 14 (now seeding astepSample+ppgHrSampleso a future regression is caught).Diagnostic-only — no scoring / stored-data / BLE / UI-logic change. Pure data-layer, so swift-packages + Android CI fully cover it (no app-build gate). Android validated locally (compile clean).